function check(check_all, item_class) 
{
	var checked_status = check_all.checked;
	$("."+item_class).each(function() {
		this.checked = checked_status;
	});
}

$(function() 
{
	$("#checked_all_a").click(function() { check(this, "item_plan_a"); });
	$("#checked_all_b").click(function() { check(this, "item_plan_b"); });
});